package com.founder.devwork.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 存储项目与仓库的关联关系
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("project_repository")
public class ProjectRepository {

    /**
     * 关联仓库ID
     */
    @TableId("repository_id")
    @NotBlank(message = "repositoryId 关联仓库ID不能为空")
    private String repositoryId;

    /**
     * 关联项目ID
     */
    @NotBlank(message = "projectId 关联项目ID不能为空")
    @TableField("project_id")
    private String projectId;

    /**
     * 关联创建时间
     */
    @TableField("created_at")
    private LocalDateTime createdAt;

    /**
     * 记录更新时间
     */
    @TableField("updated_at")
    private LocalDateTime updatedAt;
}
